<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>成都家政服务系统</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('layui/css/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('layui/layui.js')}}" charset="utf-8"></script>
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
</head>
<body>
<div style="height:100%;width:100%;position:fixed;z-index: -20">
    <img src="{{asset('img/bg1.jpg')}}" style="height:100%;width:100%;">
</div>
<div class="con-header">
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <a href="javascript:;" class="navbar-brand">成都家政服务系统</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="/employee.searchAreaTask">任务栏</a></li>
                    <li><a href="/">财务统计</a></li>
                    <li><a href="/">我的信息</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="javascript:;">{{session("employee_name")}}，欢迎您</a></li>
                    <li><a href="javascript:;">职位：{{session("employee_power")}}</a></li>
                    <li><a href="/adminLogout" style="color: red">退出</a></li>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </nav>
</div>
<div style="height:50px;"></div>
@if(session('__Ajax_RedirectFunc_status') == true)
    <div>
        <div class="alert alert-success alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>成功</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
@if(session('__Ajax_RedirectFunc_status') === false)
    <div >
        <div class="alert alert-danger alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>失败</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
<div style="height:50px;"></div>
<div class="con-body">
    <div class="banner">
        <div class="container">
            <div class="row">
                <div class="col-md-2">
                    <div class="panel panel-default">
                        <div class="panel-body" >
                            <ul class="nav nav-pills nav-stacked nav-sidebar" role="tablist" >
                                <li><a href="/employee.searchAreaTask">查看任务</a></li>
                                <li class="active"><a href="/employee.searchMyTask">我的任务</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <style type="text/css">
                    /* Sidebar navigation */
                    .nav-sidebar {
                        margin-right:-16px;
                        /*margin-bottom: 20px;*/
                        margin-left: -16px;
                    }
                    .nav-sidebar > li > a {
                        padding-right: 20px;
                        padding-left: 20px;
                    }
                    .nav-sidebar > .active > a,
                    .nav-sidebar > .active > a:hover,
                    .nav-sidebar > .active > a:focus {
                        color: #fff;
                        background-color: #428bca;
                    }
                </style>
                <div class="col-md-10" >
                    <div class="panel panel-default">
                        <div class="panel-body" >
                            <div class="form-inline">
                                <ol class="breadcrumb">
                                    <li><a href="/employee.searchAreaTask">任务栏</a></li>
                                    <li><a href="/employee.searchAreaTask">我的任务</a></li>
                                    <li class="active">金牛区</li>
                                </ol>
                                <div class="form-group">
                                    <h4>当前区域：{{$nowArea}}</h4>
                                </div>
                                <form class="form-group container-fluid">
                                    <div class="form-group">
                                        <h4>时间段选择：</h4>
                                    </div>
                                    <div class="form-group">
                                        <div class="layui-input-inline">
                                            <input type="text" name="date" id="begin"  placeholder="起始时间" autocomplete="off" class="form-control" onclick="layui.laydate({elem: this})">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="layui-input-inline">
                                            <input type="text" name="date" id="last"  placeholder="终止时间" autocomplete="off" class="form-control" onclick="layui.laydate({elem: this})">
                                        </div>
                                    </div>
                                    <button type="submit" class="btn btn-primary">确定</button>
                                </form>

                                <hr>
                                <div class="table-responsive">
                                    <table class="table table-bordered table-responsive table-striped table-hover">
                                        <thead>
                                        <tr>
                                            <th>发布时间</th>
                                            <th>任务名称</th>
                                            <th>金额</th>
                                            <th>状态</th>
                                            <th>详情</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        @foreach($myTask as $data)
                                            <tr>
                                                <td scope="row">{{$data->task_time}}</td>
                                                <td>{{$data->task_name}}</td>
                                                <td>{{$data->task_money}}</td>
                                                <td>{{$data->task_state_name}}</td>
                                                <td><a href="/employee.searchMyTasks/{{$data->task_id}}" type="button" class="btn btn-info btn-block btn-sm">详情</a></td>
                                            </tr>
                                        @endforeach
                                        </tbody>
                                    </table>
                                    <hr>
                                    <div class="bs-example" data-example-id="disabled-active-pagination">
                                        <nav aria-label="...">
                                            <ul class="pager">
                                                <li><a href="#">上一页</a></li>
                                                <li><a href="#">下一页</a></li>
                                            </ul>
                                        </nav>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.use(['form', 'layedit', 'laydate'], function(){
            var form = layui.form()
                    ,layer = layui.layer
                    ,layedit = layui.layedit
                    ,laydate = layui.laydate;

            //创建一个编辑器
            var editIndex = layedit.build('LAY_demo_editor');

            //自定义验证规则
            form.verify({
                title: function(value){
                    if(value.length < 5){
                        return '标题至少得5个字符啊';
                    }
                }
                ,pass: [/(.+){6,12}$/, '密码必须6到12位']
                ,content: function(value){
                    layedit.sync(editIndex);
                }
            });

            //监听指定开关
            form.on('switch(switchTest)', function(data){
                layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                    offset: '6px'
                });
                layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
            });

            //监听提交
            form.on('submit(demo1)', function(data){
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;
            });


        });
    </script>
</body>
</html>